package com.neusoft.neuiotms.dcom.model.malfunction;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_malfunction_frontline_processing_form", comment = "故障一线运维处理工单")
@Table(name = "neuiot_malfunction_frontline_processing_form")
public class MalfunctionFrontlineProcessingForm extends AbstractAuditModel {

    private static final long serialVersionUID = -7204084851192187109L;

    /** 工作流TaskId */
    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    /** 工单号 */
    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workNum;

    /** 故障级别编码 */
    @NotBlank(message = "故障级别编码不能为空")
    @Length(max = 255, message = "故障级别编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '故障级别编码'")
    private String failureLevelCode;

    /** 故障级别名称 */
    @NotBlank(message = "故障级别名称不能为空")
    @Length(max = 255, message = "故障级别名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '故障级别名称'")
    private String failureLevelName;

    /** 是否解决 */
    @Comment("bit(1) NOT NULL COMMENT '是否解决'")
    private Boolean solved = true;

    /** 服务类型编码 */
    @NotBlank(message = "服务类型编码不能为空")
    @Length(max = 255, message = "服务类型编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '服务类型编码'")
    private String worktypeCode;

    /** 服务类型名称 */
    @NotBlank(message = "服务类型名称不能为空")
    @Length(max = 255, message = "服务类型名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '服务类型名称'")
    private String worktypeName;

    /** 故障解决情况 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '故障解决情况'")
    private String failureSolveSituation;

    /** 资产编码 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '资产编码'")
    private String assetCodes;

    /** 状态 */
    @NotBlank(message = "状态不能为空")
    @Length(max = 255, message = "状态不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '状态'")
    private String status;

    /** 参与工程师编码 */
    @Length(max = 255, message = "参与工程师编码不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '参与工程师编码'")
    private String helperEngineerCode;

    /** 参与工程师名称 */
    @Length(max = 255, message = "参与工程师名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL DEFAULT NULL COMMENT '参与工程师名称'")
    private String helperEngineerName;

}
